#ifndef FORKEDECHOSERVER_H
#define FORKEDECHOSERVER_H

#include "ForkedEchoServer.h"

ForkedEchoServer::ForkedEchoServer(in_port_t port)
	: SocketServer(port) {
}

void ForkedEchoServer::handleAccept(int connfd, struct sockaddr_in* clientaddress) {
	int childpid = fork();
	if (childpid == 0) {
		SocketWrapper::close(_listenfd);
		echo(connfd);
		exit(0);
	}
	SocketWrapper::close(connfd);
}

void ForkedEchoServer::echo(int connfd) {

}



#endif /* FORKEDECHOSERVER_H */

